-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor local_nb types to use SyncToLocalNb #23
Conversation
{ | ||
type Item = T; | ||
type Final = F; | ||
type Error = E; | ||
|
||
async fn consume(&mut self, item: Self::Item) -> Result<(), Self::Error> { | ||
self.check_inactive(); | ||
self.0.consume(item).await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't return self.0.consume(item).await
work here (and in all analogous places)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good catch. I'll make those changes.
|
||
let scramble = SyncScramble::new(inner, sync_operations, capacity); | ||
|
||
Scramble(SyncToLocalNb(scramble)) | ||
} | ||
|
||
fn advance_operations_index(&mut self) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can delete this, the inner SyncScramble already handles this transparently.
SyncToLocalNb
wrapper for the following typeslocal_nb::consumer::invariant
local_nb::producer::invariant
local_nb::consumer::scramble
(WIP)